<div class="arrow">
  <span class="t-cart"><?php echo $text_cart; ?></span><br/>
  <span class="bt-cart">
	<?php if ($sanpham) { ?>
		Đã có <?php echo $sanpham; ?> sản phẩm</span>
	<?php } else { ?>
		Chưa có sản phẩm
	<?php } ?>
</div>
<div class="cart-content" <?php if($remove == 0) { echo 'style="display:none;"'; } ?>>
<div class="border-cart"></div>
  <div class="contents">
	<?php if ($products) { ?>
	<table cellpadding="2" cellspacing="0" style="width: 100%;font-size:11px;">
	  <?php foreach ($products as $product) { ?>
	  <tr>
		<td align="left" width="1" style="border-bottom:1px solid #FED3E4;">
		<a href="<?php echo $product['href']; ?>"><img style="border:1px solid #FED3E4;margin:5px 5px 3px 0px;" src="<?php echo $product['thumb']; ?>" /></a>
		</td>
		<td align="left" style="border-bottom:1px solid #FED3E4;max-width:120px;"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
		  <div>
			<?php foreach ($product['option'] as $option) { ?>
			- <small style="color: #999;"><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
			<?php } ?>
		  </div>
		</td>
		<td align="right" style="text-align:right;border-bottom:1px solid #FED3E4;width:1px;">
			<span style="color:#888;padding-right:4px;">x</span><span style="color:#F00;"><b><?php echo $product['quantity']; ?></b></span>
		</td>
		<?php if ($display_price) { ?>
		<td align="right" style="border-bottom:1px solid #FED3E4;">
			<?php echo $product['price']; ?>
		</td>
		<?php } ?>
		<td align="right" style="width:7px;border-bottom:1px solid #FED3E4;"><span title="<?php echo $text_thongbao; ?>" class="cart_remove" id="remove_<?php echo $product['key']; ?>">&nbsp;</span></td>
	  </tr>
	  <?php } ?>
	</table>
	<br />
	<?php if ($display_price) { ?>
	<p style="margin:0px;text-align: right;font-weight:bold;margin-bottom:10px;">
		<?php echo $text_subtotal; ?>&nbsp;<span style="color:#F00;"><?php echo $subtotal; ?></span>
	</p>
	<?php } ?>
	<div style="text-align:right;width:100%;">
		<a onclick="location='<?php echo $cart; ?>'" class="button"><span><b><?php echo $button_view_cart; ?></b></span></a> <a onclick="<?php echo $cart; ?>order/" class="fancybox button"><span><b><?php echo $text_cart_chitiet; ?></b></span></a>
	</div>
	<?php } else { ?>
		<p style="margin:18px 0px 0px;text-align: center;"><?php echo $text_empty; ?></p>
	<?php } ?>
  </div>
</div>
<script language="javascript">
$('.right .arrow').click(function(event) {
	if ($(this).hasClass('active')) {
		$('.right .cart-content').slideUp();
		$(this).removeClass('active');
	} else {
		$('.right .cart-content').slideDown();
		$(this).addClass('active');
	}
	return false;
});
$('.right .cart-content').click(function(event) {
	event.stopPropagation();
});
$(document).click(function() {
	$('.right .cart-content').slideUp();
	$('.right .arrow').removeClass('active');
});
</script>
<script type="text/javascript"><!--
$('.fancybox').fancybox({cyclic: true});
//--></script>